package com.ttdc.pojo;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;


public class OrderListExample {
	
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public OrderListExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andOlIdIsNull() {
            addCriterion("ol_id is null");
            return (Criteria) this;
        }

        public Criteria andOlIdIsNotNull() {
            addCriterion("ol_id is not null");
            return (Criteria) this;
        }

        public Criteria andOlIdEqualTo(Integer value) {
            addCriterion("ol_id =", value, "olId");
            return (Criteria) this;
        }

        public Criteria andOlIdNotEqualTo(Integer value) {
            addCriterion("ol_id <>", value, "olId");
            return (Criteria) this;
        }

        public Criteria andOlIdGreaterThan(Integer value) {
            addCriterion("ol_id >", value, "olId");
            return (Criteria) this;
        }

        public Criteria andOlIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("ol_id >=", value, "olId");
            return (Criteria) this;
        }

        public Criteria andOlIdLessThan(Integer value) {
            addCriterion("ol_id <", value, "olId");
            return (Criteria) this;
        }

        public Criteria andOlIdLessThanOrEqualTo(Integer value) {
            addCriterion("ol_id <=", value, "olId");
            return (Criteria) this;
        }

        public Criteria andOlIdIn(List<Integer> values) {
            addCriterion("ol_id in", values, "olId");
            return (Criteria) this;
        }

        public Criteria andOlIdNotIn(List<Integer> values) {
            addCriterion("ol_id not in", values, "olId");
            return (Criteria) this;
        }

        public Criteria andOlIdBetween(Integer value1, Integer value2) {
            addCriterion("ol_id between", value1, value2, "olId");
            return (Criteria) this;
        }

        public Criteria andOlIdNotBetween(Integer value1, Integer value2) {
            addCriterion("ol_id not between", value1, value2, "olId");
            return (Criteria) this;
        }

        public Criteria andOlDateIsNull() {
            addCriterion("ol_date is null");
            return (Criteria) this;
        }

        public Criteria andOlDateIsNotNull() {
            addCriterion("ol_date is not null");
            return (Criteria) this;
        }

        public Criteria andOlDateEqualTo(Date value) {
            addCriterionForJDBCDate("ol_date =", value, "olDate");
            return (Criteria) this;
        }

        public Criteria andOlDateNotEqualTo(Date value) {
            addCriterionForJDBCDate("ol_date <>", value, "olDate");
            return (Criteria) this;
        }

        public Criteria andOlDateGreaterThan(Date value) {
            addCriterionForJDBCDate("ol_date >", value, "olDate");
            return (Criteria) this;
        }

        public Criteria andOlDateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("ol_date >=", value, "olDate");
            return (Criteria) this;
        }

        public Criteria andOlDateLessThan(Date value) {
            addCriterionForJDBCDate("ol_date <", value, "olDate");
            return (Criteria) this;
        }

        public Criteria andOlDateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("ol_date <=", value, "olDate");
            return (Criteria) this;
        }

        public Criteria andOlDateIn(List<Date> values) {
            addCriterionForJDBCDate("ol_date in", values, "olDate");
            return (Criteria) this;
        }

        public Criteria andOlDateNotIn(List<Date> values) {
            addCriterionForJDBCDate("ol_date not in", values, "olDate");
            return (Criteria) this;
        }

        public Criteria andOlDateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("ol_date between", value1, value2, "olDate");
            return (Criteria) this;
        }

        public Criteria andOlDateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("ol_date not between", value1, value2, "olDate");
            return (Criteria) this;
        }

        public Criteria andOlPriceIsNull() {
            addCriterion("ol_price is null");
            return (Criteria) this;
        }

        public Criteria andOlPriceIsNotNull() {
            addCriterion("ol_price is not null");
            return (Criteria) this;
        }

        public Criteria andOlPriceEqualTo(Float value) {
            addCriterion("ol_price =", value, "olPrice");
            return (Criteria) this;
        }

        public Criteria andOlPriceNotEqualTo(Float value) {
            addCriterion("ol_price <>", value, "olPrice");
            return (Criteria) this;
        }

        public Criteria andOlPriceGreaterThan(Float value) {
            addCriterion("ol_price >", value, "olPrice");
            return (Criteria) this;
        }

        public Criteria andOlPriceGreaterThanOrEqualTo(Float value) {
            addCriterion("ol_price >=", value, "olPrice");
            return (Criteria) this;
        }

        public Criteria andOlPriceLessThan(Float value) {
            addCriterion("ol_price <", value, "olPrice");
            return (Criteria) this;
        }

        public Criteria andOlPriceLessThanOrEqualTo(Float value) {
            addCriterion("ol_price <=", value, "olPrice");
            return (Criteria) this;
        }

        public Criteria andOlPriceIn(List<Float> values) {
            addCriterion("ol_price in", values, "olPrice");
            return (Criteria) this;
        }

        public Criteria andOlPriceNotIn(List<Float> values) {
            addCriterion("ol_price not in", values, "olPrice");
            return (Criteria) this;
        }

        public Criteria andOlPriceBetween(Float value1, Float value2) {
            addCriterion("ol_price between", value1, value2, "olPrice");
            return (Criteria) this;
        }

        public Criteria andOlPriceNotBetween(Float value1, Float value2) {
            addCriterion("ol_price not between", value1, value2, "olPrice");
            return (Criteria) this;
        }

        public Criteria andOlTypeIsNull() {
            addCriterion("ol_type is null");
            return (Criteria) this;
        }

        public Criteria andOlTypeIsNotNull() {
            addCriterion("ol_type is not null");
            return (Criteria) this;
        }

        public Criteria andOlTypeEqualTo(Byte value) {
            addCriterion("ol_type =", value, "olType");
            return (Criteria) this;
        }

        public Criteria andOlTypeNotEqualTo(Byte value) {
            addCriterion("ol_type <>", value, "olType");
            return (Criteria) this;
        }

        public Criteria andOlTypeGreaterThan(Byte value) {
            addCriterion("ol_type >", value, "olType");
            return (Criteria) this;
        }

        public Criteria andOlTypeGreaterThanOrEqualTo(Byte value) {
            addCriterion("ol_type >=", value, "olType");
            return (Criteria) this;
        }

        public Criteria andOlTypeLessThan(Byte value) {
            addCriterion("ol_type <", value, "olType");
            return (Criteria) this;
        }

        public Criteria andOlTypeLessThanOrEqualTo(Byte value) {
            addCriterion("ol_type <=", value, "olType");
            return (Criteria) this;
        }

        public Criteria andOlTypeIn(List<Byte> values) {
            addCriterion("ol_type in", values, "olType");
            return (Criteria) this;
        }

        public Criteria andOlTypeNotIn(List<Byte> values) {
            addCriterion("ol_type not in", values, "olType");
            return (Criteria) this;
        }

        public Criteria andOlTypeBetween(Byte value1, Byte value2) {
            addCriterion("ol_type between", value1, value2, "olType");
            return (Criteria) this;
        }

        public Criteria andOlTypeNotBetween(Byte value1, Byte value2) {
            addCriterion("ol_type not between", value1, value2, "olType");
            return (Criteria) this;
        }

        public Criteria andTbIdIsNull() {
            addCriterion("tb_id is null");
            return (Criteria) this;
        }

        public Criteria andTbIdIsNotNull() {
            addCriterion("tb_id is not null");
            return (Criteria) this;
        }

        public Criteria andTbIdEqualTo(Integer value) {
            addCriterion("tb_id =", value, "tbId");
            return (Criteria) this;
        }

        public Criteria andTbIdNotEqualTo(Integer value) {
            addCriterion("tb_id <>", value, "tbId");
            return (Criteria) this;
        }

        public Criteria andTbIdGreaterThan(Integer value) {
            addCriterion("tb_id >", value, "tbId");
            return (Criteria) this;
        }

        public Criteria andTbIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("tb_id >=", value, "tbId");
            return (Criteria) this;
        }

        public Criteria andTbIdLessThan(Integer value) {
            addCriterion("tb_id <", value, "tbId");
            return (Criteria) this;
        }

        public Criteria andTbIdLessThanOrEqualTo(Integer value) {
            addCriterion("tb_id <=", value, "tbId");
            return (Criteria) this;
        }

        public Criteria andTbIdIn(List<Integer> values) {
            addCriterion("tb_id in", values, "tbId");
            return (Criteria) this;
        }

        public Criteria andTbIdNotIn(List<Integer> values) {
            addCriterion("tb_id not in", values, "tbId");
            return (Criteria) this;
        }

        public Criteria andTbIdBetween(Integer value1, Integer value2) {
            addCriterion("tb_id between", value1, value2, "tbId");
            return (Criteria) this;
        }

        public Criteria andTbIdNotBetween(Integer value1, Integer value2) {
            addCriterion("tb_id not between", value1, value2, "tbId");
            return (Criteria) this;
        }

        public Criteria andOlCreatorIdIsNull() {
            addCriterion("ol_creator_id is null");
            return (Criteria) this;
        }

        public Criteria andOlCreatorIdIsNotNull() {
            addCriterion("ol_creator_id is not null");
            return (Criteria) this;
        }

        public Criteria andOlCreatorIdEqualTo(Integer value) {
            addCriterion("ol_creator_id =", value, "olCreatorId");
            return (Criteria) this;
        }

        public Criteria andOlCreatorIdNotEqualTo(Integer value) {
            addCriterion("ol_creator_id <>", value, "olCreatorId");
            return (Criteria) this;
        }

        public Criteria andOlCreatorIdGreaterThan(Integer value) {
            addCriterion("ol_creator_id >", value, "olCreatorId");
            return (Criteria) this;
        }

        public Criteria andOlCreatorIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("ol_creator_id >=", value, "olCreatorId");
            return (Criteria) this;
        }

        public Criteria andOlCreatorIdLessThan(Integer value) {
            addCriterion("ol_creator_id <", value, "olCreatorId");
            return (Criteria) this;
        }

        public Criteria andOlCreatorIdLessThanOrEqualTo(Integer value) {
            addCriterion("ol_creator_id <=", value, "olCreatorId");
            return (Criteria) this;
        }

        public Criteria andOlCreatorIdIn(List<Integer> values) {
            addCriterion("ol_creator_id in", values, "olCreatorId");
            return (Criteria) this;
        }

        public Criteria andOlCreatorIdNotIn(List<Integer> values) {
            addCriterion("ol_creator_id not in", values, "olCreatorId");
            return (Criteria) this;
        }

        public Criteria andOlCreatorIdBetween(Integer value1, Integer value2) {
            addCriterion("ol_creator_id between", value1, value2, "olCreatorId");
            return (Criteria) this;
        }

        public Criteria andOlCreatorIdNotBetween(Integer value1, Integer value2) {
            addCriterion("ol_creator_id not between", value1, value2, "olCreatorId");
            return (Criteria) this;
        }

        public Criteria andOlCompleteIdIsNull() {
            addCriterion("ol_complete_id is null");
            return (Criteria) this;
        }

        public Criteria andOlCompleteIdIsNotNull() {
            addCriterion("ol_complete_id is not null");
            return (Criteria) this;
        }

        public Criteria andOlCompleteIdEqualTo(Integer value) {
            addCriterion("ol_complete_id =", value, "olCompleteId");
            return (Criteria) this;
        }

        public Criteria andOlCompleteIdNotEqualTo(Integer value) {
            addCriterion("ol_complete_id <>", value, "olCompleteId");
            return (Criteria) this;
        }

        public Criteria andOlCompleteIdGreaterThan(Integer value) {
            addCriterion("ol_complete_id >", value, "olCompleteId");
            return (Criteria) this;
        }

        public Criteria andOlCompleteIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("ol_complete_id >=", value, "olCompleteId");
            return (Criteria) this;
        }

        public Criteria andOlCompleteIdLessThan(Integer value) {
            addCriterion("ol_complete_id <", value, "olCompleteId");
            return (Criteria) this;
        }

        public Criteria andOlCompleteIdLessThanOrEqualTo(Integer value) {
            addCriterion("ol_complete_id <=", value, "olCompleteId");
            return (Criteria) this;
        }

        public Criteria andOlCompleteIdIn(List<Integer> values) {
            addCriterion("ol_complete_id in", values, "olCompleteId");
            return (Criteria) this;
        }

        public Criteria andOlCompleteIdNotIn(List<Integer> values) {
            addCriterion("ol_complete_id not in", values, "olCompleteId");
            return (Criteria) this;
        }

        public Criteria andOlCompleteIdBetween(Integer value1, Integer value2) {
            addCriterion("ol_complete_id between", value1, value2, "olCompleteId");
            return (Criteria) this;
        }

        public Criteria andOlCompleteIdNotBetween(Integer value1, Integer value2) {
            addCriterion("ol_complete_id not between", value1, value2, "olCompleteId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}